Print data forming apparatus, print data forming method, and computer-readable program

ABSTRACT

A center position designated for an image is inputted and print data which is printed is formed so that the image is printed lest a blank occurs on a sheet and the center position designated for the inputted image is located at the center of the sheet, so that a borderless printing subjected to a trimming process can be performed by simple designation.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The invention relates to a print data forming apparatus forforming print data, a print data forming method, and a computer-readableprogram and, more particularly, to a print filter serving as a programfor converting image data or the like by a command line operation andforming print data of a color printer on a terminal of an OS (OperatingSystem) of the UNIX system such as Linux or the like.

[0003] 2. Related Background Art

[0004] In recent years, in addition to commercially available OSs suchas Windows of Microsoft Corporation in U.S.A., MacOS of Apple ComputerIncorporation in U.S.A., and the like, share of Linux serving as a freeOS of the UNIX system has been increasing. In such a situation, printervendors are starting to release a print filter which plays a role of aprinter driver in Linux. As shown in FIG. 1, the print filter is aprogram for converting bit map image data such as TIFF file, JPEG file,and the like into print data of a printer. On a terminal of a text base,for example, the user makes setting upon printing as follows by anoption of a command line and performs a print.

[0005] In the case of printing photo.tif by setting of plain paper.

[0006] printfilter—model printermodel—media plain photo.tif>/dev/lp0

[0007] The recent print filter has a borderless printing function or thelike which has been realized by a printer driver for Windows andadvancement of functions has been realized. As shown in FIG. 2, the“borderless printing” is realized by a method whereby a print area of aprinter is designated so as to be larger than a sheet size, image datais enlarged or reduced so as to be fitted to the print area, and a printis performed.

[0008] However, when an aspect ratio of the sheet is different from thatof the image data as shown in FIG. 3, if the image data is fitted to theprint area, a blank occurs and a desired print result cannot beobtained. In such a case, as shown in FIG. 4, it is required for theuser to perform a trimming process so as to extract a portion to beprinted from the image data in accordance with the aspect ratio of thesheet by using an application, a tool, or the like before printing animage.

SUMMARY OF THE INVENTION

[0009] The invention is made in consideration of the conventionalexample and it is an object of the invention to execute a borderlessprinting subjected to a trimming process by simple designation.

[0010] To accomplish the above object, according to the invention, thereis provided a print data forming apparatus comprising:

[0011] input means for inputting a center position designated for animage; and

[0012] forming means for forming print data which is printed in a mannersuch that the image is printed so as not to cause a blank on a sheet andthe center position which has been inputted by the input means anddesignated for the image is located at a center of the sheet.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 is a diagram for explaining a general print filter;

[0014]FIG. 2 is a diagram for explaining a borderless printing;

[0015]FIG. 3 is a diagram for explaining an example in which a blankoccurs upon borderless printing;

[0016]FIG. 4 is a diagram for explaining an example in which a trimmingprocess is executed so as not to cause a blank upon borderless printing;

[0017]FIG. 5 is a schematic diagram showing an example of a constructionof a print filter according to the invention;

[0018]FIG. 6 is a diagram for explaining a Full process and designationof center position coordinates;

[0019]FIG. 7 is a diagram for explaining a case where the centerposition coordinates are designated so as not to cause a blank on asheet;

[0020]FIG. 8 is a diagram for explaining a case where offset coordinatesare corrected because a blank occurs on a sheet;

[0021]FIG. 9 is a diagram for explaining a reason why the blank occurswhen the offset coordinates are not corrected; and

[0022]FIG. 10 is a flowchart for explaining a processing flow in thecase where print settings of “borderless print designation” and “Full &center position coordinates designation” are designated by the user.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0023] An example of a print filter in an embodiment according to theinvention will be described in detail hereinbelow with reference to thedrawings.

[0024]FIG. 5 shows a constructional diagram of the print filter(program) according to the invention. To a print filter 100, a file nameof an image file 200 and print settings such as type of sheet, size, andthe like are instructed as command line options by the user. In theprint filter 100, the designated image file is read and print dataaccording to the print settings is formed. The user can print bytransmitting the formed print data to a printer.

[0025] In the case of performing a borderless printing, print settingsof “borderless print designation” and “Full & center positioncoordinates designation” are received as command line options by theuser.

[0026] The Full & center position coordinates will now be described withreference to FIG. 6. “Full process” is a process for enlarging orreducing a size of image data so as to eliminate a blank in a print areawhile holding an aspect ratio of original image data. As center positioncoordinates, coordinates of original image data to be moved aredesignated to a center of the print area. When the aspect ratio of theoriginal image data differs from that of the print area, if the Fullprocess is executed, the enlarged or reduced image data overflows theprint area. Therefore, the user is made to designate a portion which hewants to include into the print area. For example, when the user wantsto perform the borderless printing by cutting out an image around ahuman body, as a center, in the original image data in FIG. 6 a desiredborderless printing can be realized by designating the Full process andthe center position coordinates (300, 100).

[0027] Subsequently, a flow of processes in the case where the printsettings of “borderless print designation” and “Full & center positioncoordinates designation” are actually designated by the user will bedescribed with reference to FIG. 5.

[0028] In the print filter 100, designated option information is storedinto a print setting storage buffer 170 by an option analysis unit 150for analyzing an option designated by the user. Besides print settingssuch as type of sheet, size of sheet, and the like designated by acommand line and the file name of the image file, a printer resolution,print area information, and the like in a designated print mode are alsostored in the option information.

[0029] An image data reading unit 110 obtains the file name of the imagefile designated by the user from the print setting storage buffer 170and reads out the image data from the image file 200. The read imagedata is stored into an image data buffer 160.

[0030] Subsequently, when “Full & center position coordinatesdesignation” is designated, the Full process is executed first. In theFull process, since an enlarging/reducing process (also referred to as azooming process hereinbelow) is executed, an enlargement or reductionratio (also referred to as a zoom ratio hereinbelow) is calculated andan enlarging or reducing process is executed in an enlargement/reductionprocessing unit 120. In the enlargement/reduction processing unit 120,the number of pixels in the print area and the number of pixels of theimage data are obtained from the image data buffer 160 and the printsetting storage buffer 170. Subsequently, the number of pixels in aprinter resolution of the print area is assumed to be Px pixels in thelandscape direction and Py pixels in the portrait direction, the numberof pixels of the original image data is assumed to be Dx pixels in thelandscape direction and Dy pixels in the portrait direction, and a zoomratio a in the Full process is calculated by the following equation (1).

α=max(αx, αy)   (1)

[0031] where,

[0032] αx=Px/Dx, αy=Py/Dy

[0033] Since Px and Py indicate the numbers of pixels in the printerresolution and Dx and Dy indicate the numbers of pixels in theresolution of the original image data, respectively, a resolutionconverting process for converting from the resolution of the originalimage data into the resolution of the printer can be executedsimultaneously with the execution of the Full process.

[0034] In the enlargement/reduction processing unit 120, the enlargingor reducing process is executed on the basis of the calculated zoomratio α and a processing result is stored into the image data buffer160.

[0035] Subsequently, in an offset calculating unit 130, offsetcoordinates are calculated with respect to the image data which has beenenlarged or reduced by the Full process. The offset coordinates arecoordinates from which creation of print data is started. By calculatingthe offset coordinates and deciding a range to form the print data fromthe reduced image data, a process equivalent to a trimming process canbe realized.

[0036] In the offset calculating unit 130, to which one of the landscapedirection (x direction) and the portrait direction (y direction) theimage is shifted is determined in accordance with values of αx and αy inthe equation (1).

[0037] First, a case of αx≦αy will be described. In this case, theoffset coordinate is calculated only in the x direction (the offsetcoordinate in the y direction is equal to 0). Assuming that thecoordinates of the center position designated by the user are set to(Cx, Cy), since Cx and Cy indicate the numbers of pixels in theresolution of the original image data, a unit of each number of pixelscan be matched with the resolution of the printer by the followingequations (2) and (3).

Dx′=Dx×α  (2)

Cx′=Cx×α  (3)

[0038] If the center position coordinates designated by the user areapplied as they are, there is a case where a blank occurs. For example,if an origin of the image data is designated as center positioncoordinates, the print data is printed to only the right half portion orthe upper half portion of the print area, so that a blank occurs. Insuch a case, the center position coordinates designated by the user arenot applied as they are but Cx′ which does not cause a blank iscalculated by the following equation (4).

if ((Dx′−Cx′)<Px/2)Cx′=Dx′−Px/2   (4)

[0039] where, Px, Py: the numbers of pixels in the printer resolution ofthe print area mentioned above

[0040] Thus, an offset coordinate Ox in the x direction is calculated bythe following equation (5).

Ox=Cx′−Px/2   (5)

[0041] When αx>αy, the image is offset only in the y direction (theoffset coordinate in the x direction is equal to 0) and an offsetcoordinate Oy in the y direction is calculated by the followingequations (6) to (9).

Dy′=Dy×α  (6)

Cy′=Cy×α  (7)

if ((Dy′−Cy′)<Py/2)Cy′=Dy′−Py/2   (8)

Oy=Cy′−Py/2   (9)

[0042] Subsequently, a print data forming unit 140 forms print data onthe basis of the offset coordinates calculated by the offset calculatingunit 130, the image data stored in the image data buffer 160, andvarious information stored in a print setting storage buffer 170. In theprint data forming unit 140, the creation of the print data is startedfrom the offset coordinates and processes are executed to the data of anamount of Px pixels in the x direction and the data of an amount of Pypixels in the y direction as targets, so that the print data in which noblank occurs in the print area can be formed.

[0043] A processing flow in the case where the print settings of“borderless print designation” and “Full & center position coordinatesdesignation” have been designated by the user will now be described withreference to a flowchart of FIG. 10. To simplify the flowchart,explanation will be made on the assumption that processes regarding theoption analysis unit 150 according to the command line designation bythe user are omitted and the print settings of “borderless printdesignation” and “Full & center position coordinates designation” havebeen designated by the user. A program regarding the flowchart of FIG.10 has been stored in a memory of a computer and is executed by a CPU ofthe computer.

[0044] First, the zoom ratio α which is obtained by the equation (1) iscalculated in step S100. Subsequently, the offset amounts Ox and Oywhich are obtained by the equations (2) to (9) are calculated in stepS110. Since “Full designation” has been made by the user with respect tothe values of the offset amounts Ox and Oy, one of Ox and Oy is equal to0 as already explained in conjunction with the equations (1) to (9).

[0045] Since the print data is formed on a 1-raster unit basis in theportrait direction (y direction), a coordinate value in the portraitdirection of a process target raster in the original image is defined asY. In step S120, by setting an initial value of Y to Oy obtained in stepS110, a head of the process target raster is moved to a raster at whichthe creation of the print data is started.

[0046] In next step S130, the image data of the Yth raster is read outfrom the original image. In step S140, the image data of an amount ofone raster which has been read is enlarged or reduced in the landscapedirection (x direction) on the basis of the zoom ratio a obtained instep S100. Subsequently, in a manner similar to the case where theoffset amount Oy is applied to the y direction in step S120, in stepS150, the offset amount Ox is applied to the x direction, the pixel ofthe coordinate Ox in the x direction is set to the head pixel of theprocessing target, and the print data is formed in correspondence to thePx pixels as the number of pixels in the x direction in the printerresolution of the print area. The print data formed as mentioned aboveis transmitted to the printer in step S160.

[0047] Subsequently, whether the image data of an amount correspondingto the rasters to form the print data has been finished or not, that is,whether the print data of an amount corresponding to the Py rasters asthe number of pixels in the y direction in the printer resolution of theprint area has been formed or not is discriminated in step S170. If theimage data has been finished, the processing flow is finished at thispoint of time. If the image data to be processed still remains, thecoordinates values of the next processing target raster are calculatedon the basis of the zoom ratio a and the value of Y is updated in stepS180.

[0048] How the value of Y changes in step S180 will be explained withrespect to specific examples. A case where α≧1, that is, the enlargingprocess is executed will be explained with respect to an example inwhich α=2. A case where α<1, that is, the reducing process is executedwill be explained with respect to an example in which α=½.

[0049] When α=2, since the enlarging process of 2 times is executed, itis sufficient to form the print data twice for the original image of oneraster. In step S180, therefore, the value of Y is not changed in the2n−th process but is updated to Y=Y+1 in the (2n+1)th process.

[0050] When α=½, since the reducing process of ½ time is executed, it issufficient to form the print data every other raster. In step S180, thevalue of Y is updated to Y=Y+2 every time and the creation of the printdata of an amount of one raster of the original image data is skipped.

[0051] Subsequently, whether the value of Y has been changed or not isdiscriminated in step S190. If the value of Y has been changed, theprocessing routine is repeated from step S130 in order to read the newimage data of one raster. If the value of Y is not changed, theprocessing routine is repeated from step S150 in order to execute theprint data forming process to the image data used previously.

[0052] At timing when the print data of an amount of Py rasters has beenformed and transmitted to the printer as mentioned above, whether theprocesses are finished or not is discriminated in step S170 and theprocessing routine is finished.

[0053] Although the example in which after the original image isenlarged or reduced, the offset is calculated and the print data isformed has been explained in the embodiment, the invention can berealized by a method whereby a size of print area is zoomed so as to bematched with the portrait or landscape size of the original image(zoomed so as to be matched with the portrait size in the example ofFIG. 6), the original image is cut out in the zoomed size of print area,and the cut-out original image is zoomed so as to be matched with theprint area.

[0054] An example in which a range of the print data which is formeddiffers depending on the values of the center position coordinates willnow be specifically explained with reference to the drawings.

[0055]FIGS. 7 and 8 illustrate the print data which is formed in thecase where (200, 50) and (350, 50) are designated as center positioncoordinates, respectively. When (200, 50) are designated as centerposition coordinates, even if the designated center position coordinatesare applied as they are, no blank occurs as shown in FIG. 7.

[0056] When (350, 50) are designated as center position coordinates, ifthe designated center position coordinates are applied as they are, ablank occurs in the right portion of the sheet as shown in FIG. 9. Tocope with such a situation, an offset correcting unit is furtherprovided for the offset calculating unit 130 of the print filter 100.Since the offset correcting unit corrects the designated offsetcoordinates on the basis of the equation (5), the print data can beformed so as not to cause a blank as shown in FIG. 8.

[0057] As mentioned above, by making “Full & center position coordinatesdesignation” upon setting of the borderless printing, a desiredborderless printing can be easily realized only by designating thecommand line options without executing the trimming process such thatthe portion to be printed is extracted from the image data in accordancewith the aspect ratio of the sheet by using the application, tool, orthe like.

[0058] Although the center position coordinates have been designated bythe user on the basis of the number of pixels in the resolution of theoriginal image data in the embodiment, they can be also designated by aratio to the whole size such as “{fraction (2/3)} from the left edge”instead of the number of pixels.

[0059] Although the offset coordinates have been corrected by the offsetprocessing unit of the offset calculating unit 130 so as not to cause ablank, a warning unit is further provided, the user is warned of theoccurrence of a blank, and such a warning is displayed. If a mode tomake a correction is designated by the user on a warning display screen,the correction is made by the offset correcting unit. If a mode tointerrupt the process is designated by the user on the warning displayscreen, the process is interrupted without automatically correcting theoffset coordinates.

[0060] In the flowchart of FIG. 10, although the enlargement/reductionprocessing unit 120 has been described as a method whereby the zoomingprocess is realized by the simple enlarging or reducing process,naturally, the method of the enlarging/reducing process which isexecuted in the enlargement/reduction processing unit 120 is not limitedto it.

[0061] The invention can be applied to a system comprising a pluralityof apparatuses (for example, a host computer, an interface device, areader, a printer, and the like) or to an apparatus comprising oneequipment (for example, a copying apparatus, a facsimile apparatus, orthe like).

[0062] Naturally, the object of the invention is accomplished by amethod whereby a memory medium in which program codes of software torealize the functions of the embodiment mentioned above have beenrecorded is supplied to a system or an apparatus and a computer (or aCPU or an MPU) of the system or apparatus reads out and executes theprogram codes stored in the memory medium.

[0063] In such a case, the program codes themselves read out from thememory medium realize the functions of the embodiment mentioned aboveand the memory medium in which the program codes have been storedconstructs the invention.

[0064] As a memory medium to supply the program codes, for example, afloppy disk, a hard disk, an optical disk, a magnetooptic disk, aCD-ROM, a CD-R, a magnetic tape, a non-volatile memory card, an ROM, orthe like can be used.

[0065] Naturally, the invention incorporates not only a case where acomputer executes the read-out program codes, so that the functions ofthe embodiment mentioned above are realized but also a case where an OS(Operating System) or the like which is operating on the computerexecutes a part or all of actual processes on the basis of instructionsof the program codes and the functions of the embodiment mentioned aboveare realized by those processes.

[0066] Further, naturally, the invention incorporates a case where theprogram codes read out from the memory medium are written into a memoryprovided for a function expanding board inserted in a computer or afunction expanding unit connected to a computer and, thereafter, a CPUor the like provided for the function expanding board or the functionexpanding unit executes a part or all of the actual processes on thebasis of instructions of the program codes and the functions of theembodiment mentioned above are realized by those processes.

[0067] As described above, according to the embodiment of the invention,by making “Full & center position coordinates designation” upon settingof the borderless printing, there is an effect such that the desiredborderless printing can be easily realized without executing thetrimming process such that the portion to be printed is extracted fromthe image data in accordance with the aspect ratio of the sheet by usingthe application, tool, or the like.

[0068] As described above, according to the embodiment of the invention,the borderless printing subjected to the trimming process can beexecuted by simple designation.

What is claimed is:
 1. A print data forming apparatus comprising: inputmeans for inputting a center position designated for an image; andforming means for forming print data which is printed in a manner suchthat the image is printed so as not to cause a blank on a sheet and thecenter position which has been inputted by said input means anddesignated for the image is located at a center of the sheet.
 2. Anapparatus according to claim 1, wherein said forming means includes:zooming means for zooming the image lest a blank occurs on the sheet;and specifying means for specifying a part of the image zoomed by saidzooming means on the basis of the center position designated bydesignating means, and the print data is formed on the basis of thepartial image specified by said specifying means.
 3. An apparatusaccording to claim 1, wherein said forming means includes: specifyingmeans for specifying a part of the image on the basis of the centerposition designated by designating means; and zooming means for zoomingthe partial image specified by said specifying means lest a blank occurson the sheet, and the print data is formed on the basis of the imagezoomed by said zooming means.
 4. An apparatus according to claim 1,further comprising correcting means for correcting said center positionso as not to cause a blank on the sheet.
 5. An apparatus according toclaim 4, further comprising warning means for warning in the case wherethe blank occurs on the sheet if the print data is formed on the basisof said center position, and wherein if a mode to make a correction isinstructed by the user, said correcting means makes the correction. 6.An apparatus according to claim 1, further comprising a print filter forconverting image data by a command line operation and forming the printdata on a terminal.
 7. A print data forming method comprising: an inputstep of inputting a center position designated for an image; and aforming step of forming print data which is printed in a manner suchthat the image is printed so as not to cause a blank on a sheet and thecenter position which has been inputted by said input step anddesignated for the image is located at a center of the sheet.
 8. Amethod according to claim 7, wherein said forming step includes: azooming step of zooming the image lest a blank occurs on the sheet; anda specifying step of specifying a part of the image zoomed by saidzooming step on the basis of the center position designated by adesignating step, and the print data is formed on the basis of thepartial image specified by said specifying step.
 9. A method accordingto claim 7, wherein said forming step includes: a specifying step ofspecifying a part of the image on the basis of the center positiondesignated by a designating step; and a zooming step of zooming thepartial image specified by said specifying step lest a blank occurs onthe sheet, and the print data is formed on the basis of the image zoomedby said zooming step.
 10. A method according to claim 7, furthercomprising a correcting step of correcting said center position so asnot to cause a blank on the sheet.
 11. A method according to claim 10,further comprising a warning step of warning in the case where the blankoccurs on the sheet if the print data is formed on the basis of saidcenter position, and wherein if a mode to make the correction isinstructed by the user, the correction is made in said correcting step.12. A method according to claim 7, wherein said print data formingmethod is executed by a print filter for converting image data by acommand line operation and forming the print data on a terminal.
 13. Acomputer-readable program comprising: an input step of inputting acenter position designated for an image; and a forming step of formingprint data which is printed in a manner such that the image is printedso as not to cause a blank on a sheet and the center position which hasbeen inputted by said input step and designated for the image is locatedat a center of the sheet.
 14. A program according to claim 13, whereinsaid forming step includes: a zooming step of zooming the image lest ablank occurs on the sheet; and a specifying step of specifying a part ofthe image zoomed by said zooming step on the basis of the centerposition designated by a designating step, and the print data is formedon the basis of the partial image specified by said specifying step. 15.A program according to claim 13, wherein said forming step includes: aspecifying step of specifying a part of the image on the basis of thecenter position designated by a designating step; and a zooming step ofzooming the partial image specified by said specifying step lest a blankoccurs on the sheet, and the print data is formed on the basis of theimage zoomed by said zooming step.
 16. A program according to claim 13,further comprising a correcting step of correcting said center positionso as not to cause a blank on the sheet.
 17. A program according toclaim 16, further comprising a warning step of warning in the case wherethe blank occurs on the sheet if the print data is formed on the basisof said center position, and wherein if a mode to make the correction isinstructed by the user, the correction is made in said correcting step.18. A program according to claim 13, wherein said computer-readableprogram is executed by a print filter for converting image data by acommand line operation and forming the print data on a terminal.